﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ManterArquivoDeAudio.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
      
    <br />
    <div class="collapsePanelHeader" style="width:400px; height:15px">
    </div>
    <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" 
        AllowPaging="True" AutoGenerateColumns="False">
        <Columns>
            <asp:BoundField DataField="Codigo" HeaderText="Codigo" 
                SortExpression="Codigo" />
            <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
            <asp:BoundField DataField="Localizacao" HeaderText="Localizacao" 
                SortExpression="Localizacao" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="Autaliza" runat="server" onclick="Autaliza_Click">Atualiza</asp:LinkButton>
                    &nbsp;<asp:LinkButton ID="Delete" runat="server" onclick="LinkButton2_Click">Delete</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            &nbsp;<asp:LinkButton ID="lbAtualiza" runat="server">Atualiza</asp:LinkButton>
            &nbsp;<asp:LinkButton ID="lbRemove" runat="server">Remove</asp:LinkButton>
        </EmptyDataTemplate>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        DataObjectTypeName="Negocios.Audio" DeleteMethod="Remove" InsertMethod="Insere" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultaPorUsuario" 
        TypeName="Negocios.AudioBLL" UpdateMethod="Atualiza">
        <SelectParameters>
            <asp:SessionParameter Name="usuario" SessionField="usuario" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <br />
    <br />
    <div style="width: 400px">
        <div class="collapsePanelHeader" style="width: 400px; height: 15px">
        </div>
    <table style="width: 100%" class="divDados" width="400px">
        <tr class="divOID">
            <td style="width: 108px">
                <asp:Label ID="Label4" runat="server" Text="Código"></asp:Label>
                <br />
            </td>
            <td>
                <asp:TextBox ID="TbCodigo" runat="server" Enabled="False" Height="22px"></asp:TextBox>
&nbsp;<asp:Button ID="Novo" runat="server" onclick="Button1_Click" Text="Novo" />
            </td>
        </tr>
        <tr>
            <td style="width: 108px">
                <asp:Label ID="Label2" runat="server" Text="Nome"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TbNome" runat="server" Enabled="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="height: 27px; font-family: Arial, Helvetica, sans-serif; width: 108px">
                <asp:Label ID="Label3" runat="server" Text="Lozalização"></asp:Label>
            </td>
            <td style="height: 27px">
                <asp:TextBox ID="TbLocalizacao" runat="server" Enabled="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="font-size: x-small; height: 18px; width: 108px">
                <span style="font-family: Arial">
                <asp:Label ID="Label1" runat="server" Text="Gênero"></asp:Label>
                <o:p></o:p></span></td>
            <td style="height: 18px">
                <asp:DropDownList ID="DdGenero" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="odsGenero" DataTextField="Nome" DataValueField="Codigo" 
                    Enabled="False">
                    <asp:ListItem Value="0">Selecione um Gênero...</asp:ListItem>
                </asp:DropDownList>
                <asp:ObjectDataSource ID="odsGenero" runat="server" 
                    DataObjectTypeName="Negocios.Genero" DeleteMethod="Remover" 
                    InsertMethod="Inserir" OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="ConsultarTodos" TypeName="Negocios.GeneroBLL" 
                    UpdateMethod="Atualizar"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td style="font-size: x-small; width: 108px">
                <p class="MsoNormal">
                    <asp:Label ID="Label7" runat="server" Text="Autor"></asp:Label>
                </p>
                </td>
            <td>
                <asp:DropDownList ID="DdAutor" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="odsAutor" DataTextField="Nome" DataValueField="Codigo" 
                    Enabled="False">
                    <asp:ListItem Value="0">Selecione um Autor...</asp:ListItem>
                </asp:DropDownList>
                <asp:ObjectDataSource ID="odsAutor" runat="server" 
                    DataObjectTypeName="Negocios.Autor" DeleteMethod="Remove" InsertMethod="Insere" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultaTodos" 
                    TypeName="Negocios.AutorBLL" UpdateMethod="Atualiza"></asp:ObjectDataSource>
                </td>
        </tr>
        <tr>
            <td style="height: 18px; font-size: x-small; width: 108px">
                <p class="MsoNormal">
                    <asp:Label ID="Label8" runat="server" Text="Álbum"></asp:Label>
                </p>
            </td>
            <td style="height: 18px">
                <asp:DropDownList ID="DdAlbum" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="odsAlbum" DataTextField="Nome" DataValueField="Cod" 
                    Enabled="False">
                    <asp:ListItem Value="0">Selecione um Album...</asp:ListItem>
                </asp:DropDownList>
                <asp:ObjectDataSource ID="odsAlbum" runat="server" 
                    DataObjectTypeName="Negocios.Album" InsertMethod="Insere" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultaTodos" 
                    TypeName="Negocios.AlbumBLL"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td style="font-size: x-small; height: 7px; width: 108px">
                <p class="MsoNormal">
                    <asp:Label ID="Label9" runat="server" Text="Formato"></asp:Label>
                </p>
            </td>
            <td style="height: 7px">
                <asp:DropDownList ID="DdFormato" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="odsFormato" DataTextField="Nome" DataValueField="Codigo" 
                    Enabled="False">
                    <asp:ListItem Value="0">Selecione um Formato...</asp:ListItem>
                </asp:DropDownList>
                <asp:ObjectDataSource ID="odsFormato" runat="server" 
                    DataObjectTypeName="Negocios.Formato" DeleteMethod="Remove" 
                    InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="ConsultaTodos" TypeName="Negocios.FormatoBLL" 
                    UpdateMethod="Atualiza"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td style="width: 108px">
                <asp:Label ID="Label5" runat="server" Text="Especificação"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DdEspecificacao" runat="server" 
                    AppendDataBoundItems="True" Enabled="False" 
                    DataSourceID="odsEspecificacao" DataTextField="Nome" DataValueField="Id">
                    <asp:ListItem Value="0">Selecione uma Especificação...</asp:ListItem>
                </asp:DropDownList>
                <asp:ObjectDataSource ID="odsEspecificacao" runat="server" 
                    DataObjectTypeName="Negocios.Especificacao" InsertMethod="Insere" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultaTodosVisao" 
                    TypeName="Negocios.EspecificacaoBLL">
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td style="width: 108px; height: 58px;">
                <asp:Label ID="Label6" runat="server" Text="Software"></asp:Label>
            </td>
            <td style="height: 58px">
                <asp:DropDownList ID="DdSoftware" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="odsSoftware" DataTextField="Nome" DataValueField="Codigo" 
                    Enabled="False">
                    <asp:ListItem Value="0">Selecione um Software...</asp:ListItem>
                </asp:DropDownList>
                <asp:ObjectDataSource ID="odsSoftware" runat="server" 
                    DataObjectTypeName="Negocios.SoftwareDeReproducao" DeleteMethod="Excluir" 
                    InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="ConsultaTodos" TypeName="Negocios.Software_De_ReproducaoBLL" 
                    UpdateMethod="Atualizar"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                <asp:Button ID="BtGravar" runat="server" Enabled="False" Text="Gravar" 
                    onclick="BtGravar_Click" />
&nbsp;&nbsp;
                <asp:Button ID="BtCancelar" runat="server" Enabled="False" Height="26px" 
                    onclick="BtCancelar_Click" Text="Cancelar" />
            </td>
        </tr>
    </table>
        <asp:Label ID="lbErro" runat="server" CssClass="erro"></asp:Label>
    <br />
    <br />
    </div>
    <br />
    </asp:Content>

